Strict
Import mojo
Import agfx

Class TSoundContainer Extends StringMap<TSound>
	
	Global path:String = "sounds/"
	
	Method Load:Void(name:String, nameoverride:String = "")
		Local i:TSound = New TSound()
		i.Load(name)
				
		If nameoverride <> "" Then i.name = nameoverride.ToUpper()
		Self.Set(i.name , i)
	End
	   
	Method Find:TSound(name:String)
		name = name.ToUpper()

		' debug: print all keys in the map
	'	For Local key:String = EachIn self.Keys()
	'		Print key + " is stored in the map."
	'	Next

		Local i:TSound =  Self.Get(name)
		AssertNotNull(i, "Sound '" + name + "' not found in the SoundBank")
		Return i
	End
End
